package com.didd.core.common.base;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 通用设置是否禁用请求参数
 *
 * @author diddd
 * @since 2019/12/11
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class DisableRequest extends IdRequest {

    /**
     * 是否禁用: 0否，1是
     */
    @Max(1)
    @Min(0)
    @NotNull(message = "是否禁用不能为空")
    private Integer isDisabled;

    public DisableRequest(String id, Integer isDisabled) {
        this.id = id;
        this.isDisabled = isDisabled;
    }
}



